home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CChoreQuartet 1.0.1 / CCancelerChore.c next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  813 b   |  50 lines  |  [TEXT/KAHL]

  1. /*
  2.  * CCancelerChore.c
  3.  *
  4.  * A chore that cancels another chore.  Assign this as
  5.  * an urgent chore.
  6.  *
  7.  * © Copyright 1992 by Jamie R. McCarthy.  All rights reserved.
  8.  * This code can be both distributed and used freely.
  9.  * Internet: k044477@kzoo.edu            AppleLink: j.mccarthy
  10.  *
  11.  */
  12.  
  13.  
  14.  
  15. /********************************/
  16.  
  17. #include "CCancelerChore.h"
  18.  
  19. /********************************/
  20.  
  21. #include <CList.h>
  22.  
  23. /********************************/
  24.  
  25.  
  26.  
  27. void CCancelerChore::Perform(long *maxSleep)
  28. {
  29.     ASSERT(itsCancelee != NULL);
  30.     ASSERT(gApplication->itsIdleChores->Includes(itsCancelee));
  31.     gApplication->CancelIdleChore(itsCancelee);
  32.     itsCancelee = NULL;
  33. }
  34.  
  35.  
  36.  
  37. void CCancelerChore::setCancelee(CChore *theCancelee)
  38. {
  39.     itsCancelee = theCancelee;
  40. }
  41.  
  42.  
  43.  
  44. CObject *CCancelerChore::getCancelee(void)
  45. {
  46.     return itsCancelee;
  47. }
  48.  
  49.  
  50.